/**
 * Copyright 2009-2010 - YangJiandong(chunquedong)
 * 
 * This file is part of ChunMap project
 * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE(Version >=3)
 * 你可以自由复制、传播本项目的下载包文件，但必须保持其完整性。
 * 我们不用对使用中的风险及由此造成的损失承担任何责任。
 * 详细情况请见《ChunMap许可协议》。

 * 想了解更多有关ChunMap的信息，请访问http://code.google.com/p/chunmap/
 */
package chunmap.data.feature;

import chunmap.data.provider.DataSource;
import chunmap.model.elem.Envelope;

/**
 * @author chunquedong
 * 
 */
public interface FeatureCollection {

	public void insert(Feature f);
	public boolean remove(Feature f);

    /// <summary>
    /// 返回false短路
    /// </summary>
    /// <param name="envelope"></param>
    /// <param name="filter"></param>
	public void search(Envelope envelope, VisitFunc filter);
	public void select(Envelope envelope, VisitAction filter);
    /// <summary>
    /// 返回false短路
    /// </summary>
    /// <param name="filter"></param>
	public void find(VisitFunc filter);
	public void each(VisitAction filter);

    //------------------------------------------------------------------------

	public Envelope getEnvelope();
	public void setEnvelope(Envelope envelope);
	
	public DataSource getDataResources();
	public void setDataResources(DataSource dataResources);
	
	public LayerMetadata getMetadata();
	public void setMetadata(LayerMetadata metadata);
	
	public FeatureSchama getFeatureSchama();
	public void setFeatureSchama(FeatureSchama featureSchama);
    /// <summary>
    /// 重新计算边界
    /// </summary>
	public void reComputeEnvelope();

}
